package de.breitbeil.jbooking.task;

import java.awt.image.BufferedImage;
import java.util.Calendar;

import de.breitbeil.jbooking.util.CalendarToImage;

public class CalendarExportTask extends AbstractTask<BufferedImage, Void> {

    private Calendar firstDisplayedDay;
    private String filename;
    
    public CalendarExportTask(Calendar firstDisplayedDay, String filename) {
        super("calendarExportTask");
        
        this.firstDisplayedDay = firstDisplayedDay;
        this.filename = filename;
    }
    
    @Override
    protected BufferedImage doInBackground() throws Exception {
        return CalendarToImage.writeToImage(firstDisplayedDay, filename);
    }

}
